Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/cli

Package Overview
Dependencies
Maintainers
4
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/cli

Babel command line.

  • 7.25.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1M
decreased by-26.45%
Maintainers
4
Weekly downloads
 
Created

What is @babel/cli?

The @babel/cli package is a command-line interface for Babel, a widely used JavaScript compiler. It allows developers to compile their JavaScript files using Babel directly from the command line. This package is particularly useful for compiling modern JavaScript down to a version that is compatible with older browsers or environments. It supports various functionalities such as file transformation, watching files for changes, and outputting the compiled code.

What are @babel/cli's main functionalities?

File Transformation

This feature allows you to transform a single JavaScript file. The command takes an input file (src/index.js) and compiles it into an output file (compiled.js).

babel src/index.js --out-file compiled.js

Directory Transformation

Transforms all JavaScript files in a directory. This command compiles all files in the 'src' directory and outputs the compiled files into the 'lib' directory.

babel src --out-dir lib

Watch Mode

Automatically recompiles files when they change. This command watches all files in the 'src' directory for changes and recompiles them to the 'lib' directory whenever any file is modified.

babel src --watch --out-dir lib

Other packages similar to @babel/cli

Keywords

FAQs

Package last updated on 22 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc